<js href="__PUBLIC__/js/jquery-2.0.2.js" />
<js href="__PUBLIC__/ueditor/ueditor.config.js" />    
<js href="__PUBLIC__/ueditor/ueditor.all.min.js" />
<script>
$(function(){
    var ue = UE.getEditor('container',{
        serverUrl :'{:U('Index/ask/ueditor')}'
    });
})
</script>



<div class="wrap publish">
    <div class="container">
        <form id="question" action="{:U('index/ask/save')}" method="POST" role="form">
            
            <div class="form-group">
                <label for="title" class="sr-only">
                    标题
                </label>
                <input id="myTitle" type="text" name="title" required="" data-error=""
                autocomplete="off" class="form-control tagClose input-lg" placeholder="标题：一句话说清问题，用问号结尾"
                value="">
            </div>
            <div id="titleSuggest" class="panel hidden widget-suggest panel-default">
                <div class="panel-body">
                    <p>
                        <strong>
                            这些问题可能有你需要的答案
                        </strong>
                        <button type="button" class="widget-suggest__close btn btn-default btn-xs">
                            关闭提示
                        </button>
                    </p>
                    <ul id="qList" class="list-unstyled widget-suggest__list">
                    </ul>
                </div>
            </div>
            <div class="form-group ">
                <label class="required">
                    分类
                </label>
                <select class="form-control" name="category[]" multiple="">
                    <?php foreach ($categorys as $key => $value) { ?>
                    <option value="<?php echo $value['id'] ?>"><?php echo $value['cname'] ?></option>
                       
                    <?php } ?>
                    
                </select>
            </div>
            <div id="questionText" class="editor liveMode">
                <div id="container"></div>
            </div>
            <a class="editor__resize" href="javascript:void(0);">
                调整高度
            </a>
            <div class=" publish-footer">
                <div class="container">
                    <div class="operations clearfix">
                        <div class="shareToWeibo checkbox pull-left mr10 mb0">
                            <label for="shareToWeibo">
                                <input type="checkbox" id="shareToWeibo">
                                同步到新浪微博
                            </label>
                        </div>
                        <div class="pull-right">
                            <span class="text-muted hidden" id="editorStatus">
                                已保存
                            </span>
                            <a id="dropIt" href="javascript:void(0);" class="mr10 hidden">
                                [舍弃]
                            </a>
                            <button type="submit" data-type="question" id="publishIt" class="btn btn-primary ml10"
                            data-id="" data-do="" data-url="" data-text="发布问题" data-name="">
                                发布问题
                            </button>
                        </div>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <!-- /.container -->
</div>